package com.lm.paymentadmin;

import com.lm.paymentadmin.DB.HikariProperties;
import com.lm.paymentadmin.common.SpringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author liu2dog
 */
@Slf4j
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@ServletComponentScan
@EnableConfigurationProperties(HikariProperties.class)
@MapperScan({"com.lm.paymentadmin.mapper"})
public class PaymentAdminApplication {

	public static void main(String[] args) {
		ConfigurableApplicationContext application = SpringApplication.run(PaymentAdminApplication.class, args);
		Environment env = application.getEnvironment();
		SpringUtil.set(application);
		log.info("应用 {} 运行成功！",env.getProperty("spring.application.name"));
	}

}
